//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopOrderItem, MinishopOrderItemResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopOrderItemList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopOrderItemResponse>(`/uctoo/minishop_order_item/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopOrderItem = async (id: string) => {
  return requestClient.get<MinishopOrderItem>(`/uctoo/minishop_order_item/${id}`);
};

export const adductooMinishopOrderItem = async (data: Partial<MinishopOrderItem>) => {
  return requestClient.post<MinishopOrderItem>('/uctoo/minishop_order_item/add', data);
};

export const edituctooMinishopOrderItem = async (data: Partial<MinishopOrderItem>) => {
  return requestClient.post<MinishopOrderItem>('/uctoo/minishop_order_item/edit', data);
};

export const deleteuctooMinishopOrderItem = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_order_item/del', { id });
};
